﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ZJF.WindowTest2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            //this.button1 = new System.Windows.Forms.Button();
            //this.button1.Click += new System.EventHandler(this.button1_Click_1);
            InitializeComponent();

        }


        private void Form1_Load(object sender, EventArgs e)
        {
            MessageBox.Show("hahahf");
        }

        private void button1_Click_1(object sender, EventArgs e)
        {
            MessageBox.Show("我是一个新消息", "提醒消息", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);

        }

        private void checkedListBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            foreach (object item in this.checkedListBox1.CheckedItems)
            {

                MessageBox.Show(item.ToString());
            }

        }

        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            bool res = this.checkBox1.Checked;
            MessageBox.Show(res.ToString());
        }

        private void numericUpDown1_ValueChanged(object sender, EventArgs e)
        {
            int res = (int)this.numericUpDown1.Value;
            MessageBox.Show(res.ToString());
        }

        private void progressBar1_Click(object sender, EventArgs e)
        {
            MessageBox.Show(this.progressBar1.Value.ToString());
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Random rd = new Random();
            this.progressBar1.Value = rd.Next(0, 100);
        }
    }
}
